package com.gw.booking.dto.wechat;

import com.gw.booking.common.Constant;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;


public class WCustomerDiscountDtoOut {
    @ApiModelProperty(value = "客户优惠id")
    private Integer customerDiscountId;
    @ApiModelProperty(value = "商家id")
    private Integer merchantId;
    @ApiModelProperty(value = "商家名称")
    private String shopName;
    @ApiModelProperty(value = "优惠id")
    private Integer discountId;
    @ApiModelProperty(value = "优惠显示状态")
    private Integer discountState;
    @ApiModelProperty(value = "有效期限描述")
    private String limited;
    @ApiModelProperty(value = "有效期限")
    private Date limitedAt;
    @ApiModelProperty(value = "是否有效期限内0否1是")
    private Integer isLimited;
    @ApiModelProperty(value = "是否预定0否1是")
    private Integer reserve;
    @ApiModelProperty(value = "是否提示0否1是")
    private Integer prompt;
    @ApiModelProperty(value = "条件2中文")
    private String conditionC;
    @ApiModelProperty(value = "条件2日文")
    private String conditionJ;
    @ApiModelProperty(value = "内容中文")
    private String contentC;
    @ApiModelProperty(value = "内容日文")
    private String contentJ;
    @ApiModelProperty(value = "条件1中文")
    private String conditionC1;
    @ApiModelProperty(value = "条件1日文")
    private String conditionJ1;

    public Integer getCustomerDiscountId() {
        return customerDiscountId;
    }

    public void setCustomerDiscountId(Integer customerDiscountId) {
        this.customerDiscountId = customerDiscountId;
    }

    public Integer getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Integer merchantId) {
        this.merchantId = merchantId;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Integer getDiscountId() {
        return discountId;
    }

    public void setDiscountId(Integer discountId) {
        this.discountId = discountId;
    }

    public Integer getDiscountState() {
        return discountState;
    }

    public void setDiscountState(Integer discountState) {
        this.discountState = discountState;
    }

    public String getLimited() {
        return limited;
    }

    public void setLimited(String limited) {
        this.limited = limited;
    }

    public Date getLimitedAt() {
        return limitedAt;
    }

    public void setLimitedAt(Date limitedAt) {
        this.limitedAt = limitedAt;
    }

    public Integer getIsLimited() {
        if (limitedAt.getTime() >= new Date().getTime()) {
            return Constant.TRUE;
        } else
            return Constant.FALSE;
    }

    public void setIsLimited(Integer isLimited) {
        this.isLimited = isLimited;
    }

    public Integer getReserve() {
        return reserve;
    }

    public void setReserve(Integer reserve) {
        this.reserve = reserve;
    }

    public Integer getPrompt() {
        return prompt;
    }

    public void setPrompt(Integer prompt) {
        this.prompt = prompt;
    }

    public String getConditionC() {
        return conditionC;
    }

    public void setConditionC(String conditionC) {
        this.conditionC = conditionC;
    }

    public String getConditionJ() {
        return conditionJ;
    }

    public void setConditionJ(String conditionJ) {
        this.conditionJ = conditionJ;
    }

    public String getContentC() {
        return contentC;
    }

    public void setContentC(String contentC) {
        this.contentC = contentC;
    }

    public String getContentJ() {
        return contentJ;
    }

    public void setContentJ(String contentJ) {
        this.contentJ = contentJ;
    }

    public String getConditionC1() {
        String msg = "";
        if (reserve != null && 1 == reserve) {
            msg += "预约";
        }
        if (prompt != null && 1 == prompt) {
            msg += "提示";
        }
        return msg;
    }

    public void setConditionC1(String conditionC1) {
        this.conditionC1 = conditionC1;
    }

    public String getConditionJ1() {
        String msg = "";
        if (reserve != null && 1 == reserve) {
            msg += "予約";
        }
        if (prompt != null && 1 == prompt) {
            msg += "見せる";
        }
        return msg;
    }

    public void setConditionJ1(String conditionJ1) {
        this.conditionJ1 = conditionJ1;
    }
}
